<template>
	<view class="flex-col homepage" v-model="adds">
		<view class="wrapper">
			<uni-icons type="checkmarkempty" color="#e9e9eb" size="45"></uni-icons>
		</view>
		<view class="u-line-1 text" v-if="adds.maintenanceProcess==='1'">您的维修申请已经提交 请您耐心等待</view>
		<view class="u-line-1 text" v-if="adds.maintenanceProcess==='2'">您的维修申请正在审核中 请耐心等待</view>

		<view class="flex-col wrapper-two">
			<view class="flex-row wraper-row">
				<view class="box"></view>
				<view class="u-line-1 text-two">维修流程</view>
			</view>
			<view class="flex-row wraper-row-two">
				<view class="box-two">
					<image src="../img/u2.png" style="width:100%; height:112px;"></image>

				</view>
				<view class="flex-col flex-row box-three">
					<view class="u-line-1 text-three">提交维修申请</view>
					<view class="u-line-1 text-four">提交成功</view>
					<view class="u-line-1 text-five">审核中</view>
				</view>
				<view class="u-line-1 text-six">09/09 10:30</view>
			</view>
			<view class="flex-row wraper-row-three">
				<view class="u-line-1 text-seven">物业审核中</view>
				<view class="u-line-1 text-eight">09/09 10:30</view>
			</view>
		</view>
		<view class="flex-col wrapper-three" v-model="adds">
			<view class="flex-row wraper-row-four">
				<view class="box-four"></view>
				<view class="u-line-1 text-nine">报修信息</view>
			</view>
			<view class="flex-row wraper-row-five">
				<view class="u-line-1 text-ten">报修房屋</view>
				<view class="u-line-1 text-eleven">{{adds.address}}</view>
			</view>
			<view class="flex-row wraper-row-six">
				<view class="u-line-1 text-twelve">维修项目</view>
				<view class="u-line-1 text-thirteen">{{adds.theProjectName}}</view>
			</view>
			<view class="flex-row wraper-row-seven">
				<view class="u-line-1 text-fourteen">标题</view>
				<view class="u-line-1 text-fifteen">{{adds.theTitle}}</view>
			</view>
			<view class="flex-row wraper-row-eight">
				<view class="u-line-1 text-sixteen">问题描述</view>
				<view class="u-line-1 text-seventeen">{{adds.problemDescription}}</view>
			</view>
			<view class="flex-row wraper-row-nine">
				<view class="u-line-1 text-eighteen">手机号码</view>
				<view class="u-line-1 text-nineteen">{{adds.phone}}</view>
			</view>
			<view class="flex-row wraper-row-ten">
				<view class="u-line-1 text-twenty">预约日期</view>
				<view class="u-line-1 text-20">{{adds.appointmentTime}}</view>
			</view>
			<view class="u-line-1 text-21">
			</view>
			<view class="wraper-row-eleven"><u--image :showLoading="true" :src="adds.file" width="100%" height="150px" @click="click"></u--image></view>
		</view>
		<view class="flex-row wrapper-four">
			<u-button class="button" @click="update()">
				修改
			</u-button>
			<u-button class="button-two" @click="show=true">
				撤销申请
			</u-button>
		</view>

		<view>
			<u-modal :show="show" :title="title" :content='content' :showCancelButton="true" @confirm="delet()"
				@cancel="qx()">
			</u-modal>
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				adds: {},
				content: '确定要撤销此申请？',
				show: false,
				title: '提示',
			}
		},
		onLoad(params) {
			console.log(params.j)
			this.adds = JSON.parse(params.j)
		},
		methods: {
			delet() {
				this.show = false
				this.$axios({
					url: 'serverwg/gwb/mainXqxg',
					data: {
						maintenanceId: this.adds.maintenanceId
					},
					method: 'GET',
					success: (res) => {
						if (res.data.code === 20000) {
							uni.showModal({
								content: '修改成功',
								showCancel: false,
								success: (res) => {
									uni.navigateTo({
										url: '/pages/gwb/maintenance'
									})
								}
							});
						}else{
							uni.showModal({
								content: '修改失败请重试',
								showCancel: false,
							})
						}
					}
				})
			},
			qx() {
				this.show = false
			},
			update() {
				uni.navigateTo({
					url: '/pages/gwb/maintenanceUpdate?j=' + JSON.stringify(this.adds)
				})
			}
		}
	}
</script>
<style lang="scss" scoped>
	/** 全局样式-开始,建议放在公共css样式文件中,比如common.css 或app.vue文件 */

	html,
	body {
		margin: 0;
		width: 100%;
		height: 100%;
		font-size: 16px
	}

	view,
	text,
	image {
		position: relative;
		box-sizing: border-box;
		flex-shrink: 0;
	}

	.flex-col {
		display: flex;
		align-items: flex-start;
		flex-direction: column;
	}

	.flex-row {
		display: flex;
		align-items: flex-start;
	}

	.flex-col .flex-row {
		width: 100%
	}

	/** 全局样式-结束*/

	.homepage {
		padding: 104rpx 0rpx 70rpx 34rpx;
		background-color: #dbf1e1;

		.wrapper {
			width: 100rpx;
			height: 100rpx;
			margin: 0rpx 0rpx 18rpx 294rpx;
			border-radius: 60rpx;
			background: #2b85e4;
			line-height: 100rpx;
			text-align: center;
		}

		.text {
			width: 568rpx;
			margin-right: auto;
			margin-bottom: 74rpx;
			margin-left: auto;
			font-size: 32rpx;
			font-weight: 600;
			color: #2b85e4;
		}

		.wrapper-two {
			width: 694rpx;
			margin-bottom: 36rpx;
			padding: 34rpx 0rpx 46rpx 30rpx;
			background: #ffffff;

			.wraper-row {
				width: 182rpx;
				justify-content: space-between;
				margin-bottom: 52rpx;

				.box {
					width: 18rpx;
					height: 32rpx;
					margin-top: 6rpx;
					border-radius: 80rpx;
					background: rgba(40, 108, 255, 1);
				}

				.text-two {
					width: 146rpx;
					font-size: 32rpx;
					font-weight: 600;
					color: rgba(72, 72, 72, 1);
				}
			}

			.wraper-row-two {
				width: 628rpx;
				margin-bottom: 22rpx;

				.box-two {
					width: 40rpx;
					height: 228rpx;
					margin-right: 26rpx;
				}

				.box-three {
					width: 194rpx;
					margin-right: 190rpx;

					.text-three {
						width: 100%;
						margin-bottom: 18rpx;
						font-size: 28rpx;
						font-weight: 600;
						color: rgba(109, 109, 109, 1);
					}

					.text-four {
						width: 118rpx;
						margin-bottom: 76rpx;
						font-size: 26rpx;
						font-weight: 600;
						color: rgba(144, 144, 144, 1);
					}

					.text-five {
						width: 98rpx;
						font-size: 28rpx;
						font-weight: 600;
						color: rgba(55, 210, 47, 1);
					}
				}

				.text-six {
					width: 186rpx;
					margin-top: 60rpx;
					font-size: 26rpx;
					font-weight: 600;
					color: rgba(161, 161, 161, 1);
				}
			}

			.wraper-row-three {
				width: 571rpx;
				justify-content: space-between;
				margin-left: 56rpx;
				padding-right: 1rpx;



				.text-seven {
					width: 160rpx;
					font-size: 26rpx;
					font-weight: 600;
					color: rgba(144, 144, 144, 1);
				}

				.text-eight {
					width: 186rpx;
					font-size: 26rpx;
					font-weight: 600;
					color: rgba(161, 161, 161, 1);
				}
			}
		}

		.wrapper-three {
			width: 688rpx;
			height: 1256rpx;
			margin-bottom: 96rpx;
			padding: 32rpx 0rpx 0rpx 26rpx;
			background: #ffffff;

			.wraper-row-four {
				width: 183rpx;
				justify-content: space-between;
				margin-bottom: 24rpx;
				padding-right: 1rpx;

				.box-four {
					width: 14rpx;
					height: 32rpx;
					margin-top: 6rpx;
					border-radius: 80rpx;
					background: rgba(54, 126, 227, 1);
				}

				.text-nine {
					width: 148rpx;
					font-size: 32rpx;
					font-weight: 600;
					color: rgba(78, 78, 78, 1);
				}
			}

			.wraper-row-five {
				width: 616rpx;
				justify-content: space-between;
				padding: 38rpx 58rpx 38rpx 2rpx;
				border-bottom-width: 2rpx;
				border-bottom-style: solid;
				border-bottom-color: rgba(226, 226, 226, 1);

				.text-ten {
					width: 130rpx;
					font-weight: 600;
					color: rgba(194, 194, 194, 1);
				}

				.text-eleven {
					width: 416rpx;
					font-weight: 600;
					color: rgba(57, 61, 73, 1);
				}
			}

			.wraper-row-six {
				width: 616rpx;
				justify-content: space-between;
				padding: 38rpx 76rpx 38rpx 2rpx;
				border-bottom-width: 2rpx;
				border-bottom-style: solid;
				border-bottom-color: rgba(226, 226, 226, 1);

				.text-twelve {
					width: 120rpx;
					font-weight: 600;
					color: rgba(194, 194, 194, 1);
				}

				.text-thirteen {
					width: 398rpx;
					font-weight: 600;
					color: rgba(57, 61, 73, 1);
				}
			}

			.wraper-row-seven {
				width: 616rpx;
				justify-content: space-between;
				margin-bottom: -2rpx;
				padding: 38rpx 62rpx 38rpx 2rpx;
				border-bottom-width: 2rpx;
				border-bottom-style: solid;
				border-bottom-color: rgba(226, 226, 226, 1);

				.text-fourteen {
					width: 84rpx;
					font-weight: 600;
					color: rgba(194, 194, 194, 1);
				}

				.text-fifteen {
					width: 414rpx;
					font-weight: 600;
					color: rgba(57, 61, 73, 1);
				}
			}

			.wraper-row-eight {
				width: 616rpx;
				justify-content: space-between;
				margin-bottom: 4rpx;
				padding: 38rpx 42rpx 38rpx 0rpx;
				border-bottom-width: 2rpx;
				border-bottom-style: solid;
				border-bottom-color: rgba(226, 226, 226, 1);

				.text-sixteen {
					width: 118rpx;
					font-weight: 600;
					color: rgba(194, 194, 194, 1);
				}

				.text-seventeen {
					width: 434rpx;
					font-weight: 600;
					color: rgba(57, 61, 73, 1);
				}
			}

			.wraper-row-nine {
				width: 616rpx;
				justify-content: space-between;
				margin-bottom: -2rpx;
				padding: 38rpx 58rpx 38rpx 2rpx;
				border-bottom-width: 2rpx;
				border-bottom-style: solid;
				border-bottom-color: rgba(226, 226, 226, 1);

				.text-eighteen {
					width: 118rpx;
					font-weight: 600;
					color: rgba(194, 194, 194, 1);
				}

				.text-nineteen {
					width: 420rpx;
					font-weight: 600;
					color: rgba(57, 61, 73, 1);
				}
			}

			.wraper-row-ten {
				width: 616rpx;
				justify-content: space-between;
				margin-bottom: 14rpx;
				padding: 38rpx 142rpx 38rpx 2rpx;
				border-bottom-width: 2rpx;
				border-bottom-style: solid;
				border-bottom-color: rgba(226, 226, 226, 1);

				.text-twenty {
					width: 120rpx;
					font-weight: 600;
					color: rgba(194, 194, 194, 1);
				}

				.text-20 {
					width: 334rpx;
					font-weight: 600;
					color: rgba(57, 61, 73, 1);
				}
			}

			.text-21 {
				width: 78rpx;
				margin-bottom: 20rpx;
				font-size: 28rpx;
				font-weight: 600;
				color: rgba(146, 146, 146, 1);
			}

			.wraper-row-eleven {
				width: 616rpx;
				height: 282rpx;
				border-width: 1rpx;
				border-style: solid;
				text-align: center;
				line-height: 282rpx;
				color: darkgray;
			}
		}

		.wrapper-four {
			width: 654rpx;
			justify-content: space-between;
			margin-left: 14rpx;

			.button {
				width: 280rpx;
				font-size: 32rpx;
				background: rgba(50, 81, 255, 1);
				font-weight: 600;
				color: rgba(255, 255, 255, 1);
			}

			.button-two {
				width: 280rpx;
				border-width: 4rpx;
				border-style: solid;
				border-color: rgba(255, 17, 17, 1);
				font-size: 32rpx;
				font-weight: 500;
				color: rgba(242, 48, 48, 1);
			}
		}
	}
</style>
